package io;

import java.io.*;

public class CopyDemo3BufferedZUOYE {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.txt");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        FileInputStream fis=new FileInputStream("fis.txt");
        BufferedInputStream bis=new BufferedInputStream(fis);
        long start=System.currentTimeMillis();
        int a;
        while ((a= bis.read())!=-1){
            bos.write(a);
        }
        long end=System.currentTimeMillis();
        System.out.println("复制完毕：耗时："+(end-start)+"ms");
        bis.close();
        bos.close();
    }
}
